﻿<UserControl x:Class=" LocultApp.Views.Pages.EditPageDocuments.EditProjectDocumentView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 

             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="300"
             
             xmlns:view="clr-namespace:LocultApp.Controls.Solution"
             xmlns:local="clr-namespace:LocultApp.Local"
             >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid Grid.Row="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <Grid Grid.Row="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <TextBlock Grid.Row="0" Text="{Binding SourceFileName}" Style="{StaticResource Heading1}" ToolTip="{Binding SourceFilePathName}" Margin="3,3,3,18" />
                <StackPanel Orientation="Vertical" Grid.Row="1">
                    <Label Content="{x:Static local:Strings.STR_LABEL_SourceFileDirectory}"
                           ContentStringFormat="{}{0}:"
                           Target="{Binding ElementName=txtNewSolutionLocation, UpdateSourceTrigger=PropertyChanged}" />
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Button Content="..."
                                Command="{Binding BrowseSourceFileCommand}"
                                Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" />
                        <TextBox Grid.Column="1"
                                 Text="{Binding SourceFilePathName, UpdateSourceTrigger=PropertyChanged}"
                                 Name="txtNewSolutionLocation" />
                    </Grid>
                </StackPanel>
            </Grid>

            <StackPanel Grid.Row="1" Orientation="Vertical">
                <Label Content="{x:Static local:Strings.STR_LABEL_Comment}"
                           ContentStringFormat="{}{0}:"
                           Target="{Binding ElementName=txtSourceFileDirectoryComment, UpdateSourceTrigger=PropertyChanged}" />
                <TextBox Text="{Binding Comment, UpdateSourceTrigger=PropertyChanged}" Name="txtSourceFileDirectoryComment" />
            </StackPanel>
        </Grid>

        <GroupBox Header="{x:Static local:Strings.STR_HEADER_TargetFiles}" Grid.Row="1" Margin="3">
            <view:UpdateTargetFilesView DataContext="{Binding UpdateTargetFiles}" Margin="3" />
        </GroupBox>
    </Grid>
</UserControl>
